<!-- 轮播图 -->
<template>
	<swiper :indicator-dots="true" :autoplay="true" :interval="3000" :duration="1000" circular indicator-active-color='#ff3866'>
		<swiper-item v-for='(item,index) in dataList' :key='index'>
			<view class="swiper-item">
				<image class='swiper-img' :src="item.imgUrl" mode=""></image>
			</view>
		</swiper-item>
	</swiper>
</template>

<script setup>
	const props = defineProps({
		dataList:{
			type: Array,
		},
	})
</script>
<style scoped>
	/* spiper默认有高度，重新设置高度 */
	swiper {
		width: 100%;
		height: 400rpx;
	}

	.swiper-img {
		width: 100%;
		height: 400rpx;
	}
</style>
